﻿<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <title>管理员登录</title>

        <link rel="stylesheet" href="/Manage/css/frozen.css">
        <link rel="stylesheet" href="/Manage/css/demo.css">
        <style type="text/css">
            .blank{position: fixed; width: 100%; height: 100%; background:#3283AC url(/Manage/images/admin-login-bg.jpg) bottom center; color: #fff;}
            .form{position: fixed; width: 90%; bottom: 30%; left: 5%;}
            .form .ui-border-b{border-bottom: #fff 1px dashed;}
            .form .ui-btn-wrap{margin-top: 40px;}
        </style>

    </head>
    
    <body ontouchstart>


        <div class="demo-block" >
            <div class="ui-form ui-border-t blank">
                <div class="form">
                <form class="form form-horizontal" action="https://www.mayizhihuan.com/admin/Index/login" method="post" id="formlogin">
                    <div class="ui-form-item ui-border-b">
                        <label> 用户名</label>
                        <input type="text" placeholder="" name="admin_name">
                        <a href="#" class="ui-icon-close"></a>
                    </div>
                    
                    <div class="ui-form-item ui-border-b">
                        <label> 密码</label>
                        <input type="password" placeholder="" name="admin_passwd">
                        <a href="#" class="ui-icon-close"></a>
                    </div>

                    <div class="ui-form-item ui-form-item-r ui-border-b" id="yzmlist" style="display: none;">
                        <input class="input-text size-L" type="text" name="captcha" placeholder="验证码" style="width:150px;">
                        <img src="/data/index.php/admin/Index/verify" width="120" id="yanzhengma"> 
                        <button type="button" class="ui-border-l" id="kanbuq" onclick="document.getElementById('yanzhengma').src='/Admin/Index/verify'">换一张</button>
                        <a href="#" class="ui-icon-close"></a>
                    </div>

                    <div class="ui-btn-wrap">
                        <button class="ui-btn-lg" type="submit">
                            登陆
                        </button>
                    </div>
                </form>
                </div>
            </div>
        </div>
        <script type="text/javascript" src="/Manage/lib/jquery/1.9.1/jquery.min.js"></script> 
        <script type="text/javascript" src="/Manage/js/H-ui.js"></script> 
        <script type="text/javascript" src="/Manage/lib/layer/2.1/layer.js"></script>
        <script type="text/javascript" src="/Manage/lib/Validform/5.3.2/Validform.min.js"></script>
        <script type="text/javascript" src="/Manage/js/s.js"></script>
        <script type="text/javascript">
        var API_VALIDATE='https://www.mayizhihuan.com/admin/Index/verify';

        var errortime=0;
          $("#formlogin").Validform({
            tiptype:4,
            ajaxPost:true,
            admin_name: "required",
            admin_passwd: "required",
            callback:function(data){
              // console.log(data);
              if(data.status==1){
                window.parent.location.href="/Manage/mobile/apply-list.html";
                layer.msg(data.info,{icon:1,time:1000});
              }else{
                errortime++;
                if(data.info=="验证码不正确"){
                    $("#yzmlist").show();
                }
                layer.msg(data.info,{icon:2,time:1000});
              }

              // document.getElementById('yanzhengma').src=API_VALIDATE;
            }
        });

        $(document).on('click','a.ui-icon-close',function(){
            $(this).parent().find("input").val("");
        })
        </script>
    </body>
</html>